﻿@using Microsoft.AspNetCore.Hosting
@using Microsoft.Extensions.Hosting
@using Microsoft.Extensions.Options
@using Easy.Options
@{
    ThemeEntity theme = themeService.GetCurrentTheme();
    if (theme == null)
    {
        Style.Reqiured("bootStrap").AtHead();
    }
}
@inject IThemeService themeService
@inject IOptions<CultureOption> cultureOption
<!DOCTYPE html>
<html lang="@cultureOption.Value.Code">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    @if (this.WorkContext().OuterChainPicture)
    {
        <meta name="referrer" content="same-origin" />
    }
    @if (this.WorkContext().EnableResponsiveDesign)
    {
        <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,maximum-scale=1.0" />
    }
    @StyleAtHead()
    @ScriptAtHead()
    @if (theme != null && ApplicationContext.HostingEnvironment.IsDevelopment())
    {
        <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.UrlDebugger)" />
    }
    else
    {
        <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.Url)" />
    }
</head>
<body>
    <div id="container" class="container">
        @RenderBody()
    </div>
    @StyleAtFoot()
    @ScriptAtFoot()
</body>
</html>